<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateQhSchoolPlanTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('qh_school_plan', function (Blueprint $table) {
            $table->id();
            $table->integer('schoolId', false, true)->comment('学校Id');
            $table->integer('schoolSpecId', false, true)->comment('专业Id');
            $table->string('class')->nullable()->comment('专业层次(对口类)');
            $table->integer('year')->comment('年份');
            $table->integer('num')->default(0)->comment('招生人数');
            $table->string('whcd')->nullable()->comment('文化程度');
            $table->string('xz')->comment('学制');
            $table->decimal('price')->default(0)->comment('学费');
            $table->text('remarks')->nullable()->comment('备注');
            $table->timestamps();
        });
        DB::statement("ALTER TABLE qh_school_spec_real comment '学校招生计划'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('qh_school_plan');
    }
}
